/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.shop.entity.shop;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;
import com.thinkgem.jeesite.modules.hk.shop.entity.product.HkShopProduct;
import com.thinkgem.jeesite.modules.hk.sys.entity.user.HkUser;
import org.hibernate.validator.constraints.Length;

/**
 * 乐购用户优惠券Entity
 *
 * @author 李欣荣
 * @version 2018-09-28
 */
public class HkUserCoupon extends DataEntity<HkUserCoupon> {

    private static final long serialVersionUID = 1L;
    private HkShopProduct product;        // 商品id
    private HkShopCoupon coupon;        // 券id
    private String title;        // 名称
    private String state;        // 1正常2已出售3已过期4已使用5出售中
    private String integral;        // 乐币
    private HkUser user;        // 用户id

    public HkUserCoupon() {
        super();
    }

    public HkUserCoupon(String id) {
        super(id);
    }

    public HkShopProduct getProduct() {
        return product;
    }

    public void setProduct(HkShopProduct product) {
        this.product = product;
    }

    public HkShopCoupon getCoupon() {
        return coupon;
    }

    public void setCoupon(HkShopCoupon coupon) {
        this.coupon = coupon;
    }

    @ExcelField(title = "优惠券名称", align = 2)
    @Length(min = 0, max = 200, message = "名称长度必须介于 0 和 200 之间")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @ExcelField(title = "券状态", align = 2, dictType = "user_coupon_state")
    @Length(min = 0, max = 11, message = "1正常2已出售3已过期4已使用5出售中长度必须介于 0 和 11 之间")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @ExcelField(title = "乐币", align = 2)
    @Length(min = 0, max = 11, message = "乐币长度必须介于 0 和 11 之间")
    public String getIntegral() {
        return integral;
    }

    public void setIntegral(String integral) {
        this.integral = integral;
    }

    public HkUser getUser() {
        return user;
    }

    public void setUser(HkUser user) {
        this.user = user;
    }

}